﻿using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace LuoYi.Admin.Entities;

/// <summary>
/// 定时任务调度日志表
/// </summary>
[Table("sys_job_log")]
public class SysJobLog : IEntity
{
    /// <summary>
    /// 任务日志ID
    /// </summary>
    [Key]
    [Column("job_log_id", TypeName = "bigint(20)")]
    public long JobLogId { get; set; }

    /// <summary>
    /// 任务名称
    /// </summary>
    [Column("job_name")]
    [StringLength(64)]
    public string JobName { get; set; } = null!;

    /// <summary>
    /// 任务组名
    /// </summary>
    [Column("job_group")]
    [StringLength(64)]
    public string JobGroup { get; set; } = null!;

    /// <summary>
    /// 调用目标字符串
    /// </summary>
    [Column("invoke_target")]
    [StringLength(500)]
    public string InvokeTarget { get; set; } = null!;

    /// <summary>
    /// 日志信息
    /// </summary>
    [Column("job_message")]
    [StringLength(500)]
    public string? JobMessage { get; set; }

    /// <summary>
    /// 执行状态（0正常 1失败）
    /// </summary>
    [Column("status")]
    [StringLength(1)]
    public string? Status { get; set; }

    /// <summary>
    /// 异常信息
    /// </summary>
    [Column("exception_info")]
    [StringLength(2000)]
    public string? ExceptionInfo { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    [Column("create_time", TypeName = "datetime")]
    public DateTime? CreateTime { get; set; }
}
